<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
    <style>
        .box {
            width: 1000px;
        }

        .f {
            width: 500px;
        }
    </style>
</head>

<body>
    <!-- 定义挂载点 -->
    <div id="app">
        <div class="box container">
            <h2>学生信息输入</h2>
            <div class="f">
                <div class="form-group">
                    <label>姓名</label>
                    <input type="text" class="form-control">
                </div>
                <div class="form-group">
                    <label>年龄</label>
                    <input type="text" class="form-control">
                </div>
                <div class="form-group">
                    <label>备完信息</label>
                    <textarea class="form-control" rows="5"></textarea>
                </div>
                <button class="btn btn-primary">添加</button>
                <button class="btn btn-info">重置</button>
            </div>

            <h2>学生的信息展示</h2>
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>姓名</th>
                        <th>年龄</th>
                        <th>爱好</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>张三</td>
                        <td>年龄</td>
                        <td>方式方法是</td>
                        <td><button class="btn btn-danger">删除</button></td>
                    </tr>
                    <tr">
                        <td colspan="5"><button class="btn btn-danger">全部删除</button></td>
                    </tr>
                    <tr>
                        <td colspan="5">暂无数据</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <script>
        new Vue({
            //挂载点
            el: "#app",
            //数据
            data: {
                persons:[
                    {
                        id:1,
                        name:"张三",
                        age:18,
                        hobby:'敲代码'
                    },
                    {
                        id:2,
                        name:"李四",
                        age:18,
                        hobby:'唱歌'
                    },
                    {
                        id:3,
                        name:"王五",
                        age:18,
                        hobby:'敲代码'
                    }
                ]
            },
            //方法
            methods: {

            }
        })
    </script>
</body>

</html>